package com.hankol.feature_wine_meal.api

import com.baselibrary.base.BasicListBean
import com.baselibrary.net.result.HttpResult
import com.okhttp.comment.CommentBean
import com.hankol.feature_wine_meal.bean.*
import io.reactivex.Observable
import retrofit2.http.*

/**
 * @author: 关忆北、
 * @date: 2022/6/27
 * @Des：
 */
interface WineMealApi {
    @FormUrlEncoded
    @POST("appetizer/diet/refresh")
    fun reqCuisine(
            @Field("token") token: String
    ): Observable<HttpResult<ArrayList<CuisineRefreshBean>>>

    //换一批
    @FormUrlEncoded
    @POST("appetizer/diet/change")
    fun reqChangeBatch(
            @Field("token") token: String,
            @Field("categoryId") categoryId: Long
    ): Observable<HttpResult<ArrayList<AppetizerDiet>>>

    //菜谱详情
    @FormUrlEncoded
    @POST("appetizer/diet/load")
    fun reqFoodInfo(
            @Field("token") token: String,
            @Field("id") id: Long
    ): Observable<HttpResult<FoodDetailsBean>>

    //热门菜谱
    @FormUrlEncoded
    @POST("appetizer/diet/getHotPager")
    fun reqHotFood(@Field("token") token: String, @Field("size") size: Int, @Field("page") page: Int): Observable<HttpResult<BasicListBean<FoodDetailsBean>>>

    //精选推荐列表
    @FormUrlEncoded
    @POST("appetizer/diet/getRecommendList")
    fun reqRecommend(@Field("token") token: String): Observable<HttpResult<ArrayList<RecommendFoodBean>>>

    //精选推荐详情页
    @FormUrlEncoded
    @POST("appetizer/diet/getRecommendPager")
    fun reqRecommendInfo(@Field("token") token: String, @Field("id") id: Long, @Field("page") page: Int): Observable<HttpResult<BasicListBean<FoodDetailsBean>>>

    /**
     * 详情评论
     *
     * @return
     */
    @FormUrlEncoded
    @POST("web/comment/v1.19.2/getPagerWithTop")
    fun reqCommentList(@Field("token") token: String, @Field("size") size: Int, @Field("type") type: Int, @Field("typeId") typeId: Long, @Field("page") page: Int, @Field("pid") pid: Long, @Field("topCommentId") topCommentId: Long): Observable<HttpResult<CommentBean.DataBean>>

    /**
     * 详情评论
     *
     * @return
     */
    @FormUrlEncoded
    @POST("appetizer/diet/getCategoryList")
    fun reqCharacteristic(@Field("token") token: String): Observable<HttpResult<ArrayList<CharacteristicBean>>>

    /**
     * 酣享体验go
     *
     * @return
     */
    @FormUrlEncoded
    @POST("appetizer/diet/getGoConfig")
    fun reqGoConfig(@Field("token") token: String): Observable<HttpResult<String>>

}